package com.zhika.zishi.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.zhika.zishi.R;
import com.zhika.zishi.customview.TitleView;
import com.zhika.zishi.interfaces.TitleInterface;

/**
 * Created by shi-02 on 2015/4/17.
 * 编辑中的攻略
 */
public class EditingStrategyActivity extends BaseActivity {

    private TitleView titleView;

    private RelativeLayout pictureLayout;

    private EditText contentEdit;

    private TextView pageText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.editing_strategy_layout);

        initView();
    }

    private void initView(){
        titleView = (TitleView) findViewById(R.id.editing_strategy_title_view);
        titleView.setLeftButtonText("返回");
        titleView.setMiddleRowText("编辑");
        titleView.setRightButtonText("确定");
        titleView.setTitleViewInterface(new TitleInterface() {
            @Override
            public void leftTitleListener() {
                finish();
            }

            @Override
            public void middleTitleListener() {

            }

            @Override
            public void rightTitleListener() {
                 finish();
            }
        });

        contentEdit = (EditText) findViewById(R.id.editing_strategy_content_edit);
        pictureLayout = (RelativeLayout) findViewById(R.id.editing_strategy_picture_layout);
        pageText = (TextView) findViewById(R.id.editing_strategy_page_text);

        pictureLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(EditingStrategyActivity.this,"更换图片",Toast.LENGTH_SHORT).show();

            }
        });
    }
}
